﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebNhaCungCap.app.DAO
{
    public class QUYENHAN
    {
        public static void InsertQUYENHAN(String tenQuyenHan)
        {
            String sql = "INSERT INTO QUYENHAN(TenQuyen) values(N'" + tenQuyenHan + "')";
            Dataprovider dp = new Dataprovider();
            dp.ExecuteNonQuery(sql);
        }

        public static void UpdateQUYENHAN(DTO.QUYENHAN QuyenHan)
        {
            String sql = "UPDATE QUYENHAN SET TenQuyen=N'" + QuyenHan.TenQuyen + "' where MaQuyen=" + QuyenHan.MaQuyen;
            Dataprovider dp = new Dataprovider();
            dp.ExecuteNonQuery(sql);

        }

        public static void DeleteQUYENHAN(int maQH)
        {
            Dataprovider dp = new Dataprovider();
            dp.DELETE_QUYENHAN("DELETE_QUYENHAN", maQH);
        }
    }
}